package cn.tedu.orderservice.feign;

import cn.tedu.charging.common.pojo.vo.UserVO;
import cn.tedu.charging.common.response.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;

@FeignClient("userservice")
public interface UserClient {
    /**
     * 获取用户绑定车辆
     * @param userId
     * @return
     */
    @GetMapping("/v1/user/info/{userId}")
    public JsonResult<UserVO> getUserInfo(@PathVariable("userId") Long userId);
    /**
     * 查询用户余额
     */
    @GetMapping("/v1/user/balancer/{userId}")
    public JsonResult<BigDecimal> getUserBalance(@PathVariable("userId") Long userId);
    //todo feign调用时,接口怎么传参,怎么把bean注入到不在容器的类里
}
